package com.dingup.api.bean.requestBean.subject;

import com.dingup.api.model.lesson.LessonSubjectInfo;
import org.apache.commons.lang.StringUtils;

/**
 * Created by wancheng on 2018/8/25.
 */
public class ExamSubjectBean {

    private Integer id;

    private String name_en;

    private String name_ch;

    private Integer value;

    private Integer order;

    private Integer lessonId;

    public LessonSubjectInfo asLessonSubjectInfo(){
        LessonSubjectInfo lessonSubjectInfo = new LessonSubjectInfo();
        lessonSubjectInfo.setId(this.id);
        lessonSubjectInfo.setNameEn(this.name_en);
        lessonSubjectInfo.setNameCh(this.getName_ch());
        lessonSubjectInfo.setClassHour(this.value);
        lessonSubjectInfo.setOrder(this.order);
        lessonSubjectInfo.setLessonId(this.lessonId);
        return lessonSubjectInfo;
    }
    public static ExamSubjectBean getExamSubjectBean(LessonSubjectInfo lessonSubjectInfo){
        ExamSubjectBean e = new ExamSubjectBean();
        e.setId(lessonSubjectInfo.getId());
        e.setName_ch(lessonSubjectInfo.getNameCh());
        e.setName_en(lessonSubjectInfo.getNameEn());
        e.setValue(lessonSubjectInfo.getClassHour());
        e.setOrder(lessonSubjectInfo.getOrder());
        return e;
    }
    public String getName_en() {
        return name_en;
    }

    public void setName_en(String name_en) {
        this.name_en = name_en;
    }

    public String getName_ch() {
        return name_ch;
    }

    public void setName_ch(String name_ch) {
        this.name_ch = name_ch;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public Integer getOrder() {
        return order;
    }

    public void setOrder(Integer order) {
        this.order = order;
    }

    public Integer getLessonId() {
        return lessonId;
    }

    public void setLessonId(Integer lessonId) {
        this.lessonId = lessonId;
    }
}
